package com.bootdo.change.service.impl;


import java.util.Date;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.bootdo.change.dao.ChangeTaskDao;
import com.bootdo.change.entity.ChangeTask;
import com.bootdo.change.service.ChangeTaskService;

@Service
public class ChangeTaskServiceImpl implements ChangeTaskService {

	@Autowired
	private ChangeTaskDao changeTaskDao;
	@Override
	public ChangeTask get(String id) {
		
		return changeTaskDao.get(id);
	}

	@Override
	public List<ChangeTask> list(Map<String, Object> map) {
		
		return changeTaskDao.list(map);
	}

	@Override
	public int count(Map<String, Object> map) {
		
		return changeTaskDao.count(map);
	}

	@Override
	public int save(ChangeTask tChangeTask) {
		return changeTaskDao.save(tChangeTask);
	}

	@Override
	public int update(ChangeTask tChangeTask) {
		
		return changeTaskDao.update(tChangeTask);
	}

	@Override
	public int remove(Integer id) {
		
		return changeTaskDao.remove(id);
	}

	@Override
	public int batchRemove(Integer[] ids) {
		
		return changeTaskDao.batchRemove(ids);
	}


	@Override
	public ChangeTask getOne(Long roleId) {
		
		return changeTaskDao.getOne(roleId);
	}

	public void updateOne(Date date,Long id) {
//		Map<String,Object> map = new HashMap<>();
//		map.put("date", date);
//		map.put("id", id);
		changeTaskDao.updateOne(date,id);
	}

	@Override
	public ChangeTask selectOne(Long providerId,Long orderId) {
		
		return changeTaskDao.selectOne(providerId,orderId);
	}

	@Override
	public ChangeTask selectAll(Long roleId,Long orderId) {
		return changeTaskDao.selectAll(roleId,orderId);
	}

	@Override
	public ChangeTask selectOver(Long roleId) {
		return changeTaskDao.selectOver(roleId);
	}

	@Override
	public ChangeTask getNew(Long roleId) {
		return changeTaskDao.getNew(roleId);
	}

	@Override
	public ChangeTask haveTask(Long roleId) {
		
		return changeTaskDao.haveTask(roleId);
	}

	@Override
	public ChangeTask selectByOne() {
		return changeTaskDao.selectByOne();
	}

}
